<?php
/*
 * 格式：
 * {
 *      "type":"1",
 *      "title":"网页标题",
 *      "tenant_id":"",
 *      "url":"",
 *      "content":{
 *          "head":{
 *             "image":"",
 *          },
 *          "body":[
 *              {
 *                  "title":"",
 *                  "desc"
 *              },
 *              {
 *                  "title":"",
 *                  "desc"
 *              },
 *              {
 *                  "title":"",
 *                  "desc"
 *              }
 *          ]
 *      }
 * }
 */
?>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="overview &amp; stats" Cache-control="max-age=5"/>
    <meta name="format-detection" content="telephone=no"/>
    @if(isset($data['title']))
      <title>{!! $data['title'] !!}</title>
    @endif
    <style>
        body{margin:0;background:#f7f7f7}@media only screen and (min-width:1366px){html{font-size:12px}body{width:40%;margin:0 30%}}@media only screen and (max-width:800px){html{font-size:9px}}@media only screen and (min-width:800px){html{font-size:11px}}html{font-family:"Microsoft YaHei", "微软雅黑", "宋体", Arial, sans-serif;user-select:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none}ul{padding:0;margin:0;width:100%}.top-img{width:100%}.top-img img{width:100%;height:auto}li{list-style:none;border-bottom:1px solid #ececec;height:60px;line-height:60px;padding:0 15px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:1.7rem;display:flex;align-items:center;width:100%;box-sizing:border-box;position:relative}li>span{width:90%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}li>img{height:20px;width:auto;position:absolute;right:15px}.next-img{height:20px;background:url('data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAA8CAQAAABCpRuhAAACD0lEQVR4AZ3XAwxeSxDF8Xm1bdu2bSmo7aB2VL5/FdUMatu2bdu2pc3E+E4mxm9xd/eeMVrzlGtUxtQy3vKTn3ykrk7c5uff+kwTlSjOy4B8pYVGGEV4FpBvtNcIIx+PAvKD7hph5OKeI301wsjCLX6GGqIRRgauOjJSI4zUXHBkPP8phJGCU45M5j+FMJJwzJHZRFUIIyH7HJlPVIUw4rHTkeXEUAgjDpscWUsshTBistqRLcRRCCMGix3ZTXyFMKIy15GDJFIIIwozHDlOUoUw/mOiI2dJGSHhNdaRi6TVCGOYI9fJpBHGQEduk00jjJ78CMgDcmuE0dWRxxTUCKMN3wLynKIaYTTjS0BeUVYjjEZ8DshbKmuEUZsPAXlPVUOrKrwLyE2VqM77QFzXgHp89IVUVoAmvp1vqKBsZws/GS8ppXzUDg48o4hytLr7AX9EPuWA93XgHrmUazbEL/stsiiXfZQDV8mARUr8x3gHLpBGeX6nOHCaFFikRFRmO3CMJMqvaL4D+0io/BCXO7CTeFikRCzWObCJOEo42OLAamJikRLx2ePAEiWiJOKgA3OVoJSU4w7MUOJaSs46MFEJjWm56MBYJf1m4roDw5QAnY3bDgxSYnxuHngz0UtpJgry2IGuSktTlOfeWLVVGqtSvPL2rhmmELe8yWyEacTrv8AHamMq0YKX3KIKptYvesRSnvmcK0oAAAAASUVORK5CYII=') no-repeat center;background-size:cover;width:15px;top:20px;position:absolute;right:15px}a{color:#000;text-decoration:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}
    </style>
</head>
<body>
@if(isset($data['content']['head']['image']))
    <div class="top-img"><img src="{!! $data ['content']['head']['image'] !!}"></div>
@endif
<ul>
    @if(isset($data['content']['body']))
        @foreach($data['content']['body'] as $item)
            @if(isset($item['url']) || isset($item['title']))
                <a href="{!! $item['url'] !!}"><li><span>{!! $item['title'] !!}</span><div class="next-img"></div></li></a>
            @endif
        @endforeach
    @endif
</ul>
</body>